package com.tb.mapper;

import com.tb.pojo.Goods;
import com.tb.pojo.GoodsExample;
import com.tb.pojo.ShopParam;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface GoodsMapper {

    //商品加入购物车参数
    List<ShopParam> getGoodsParam(Map<String, String> map);

    //int deleteByGoodsId(String goodsId);

    //获取一件商品所有评论
    Goods goodsComments(Map<String, Object> map);

    //获取单个商品详情-宁
    Goods goodsDetails(Map<String, String> map);

    long countByExample(GoodsExample example);

    int deleteByExample(GoodsExample example);

    int deleteByPrimaryKey(String goodsId);

    int insert(Goods record);

    //商品增加
    int insertSelective(Goods record);

    /******************************************************/
    /*商品列表，*/
    List<Goods> selectGoodsBysold(Map<String, Object> map);

    /******************************************************/
    List<Goods> selectByExample(GoodsExample example);

    Goods selectByPrimaryKey(String goodsId);

    int updateByExampleSelective(@Param("record") Goods record, @Param("example") GoodsExample example);

    int updateByExample(@Param("record") Goods record, @Param("example") GoodsExample example);

    int updateByPrimaryKeySelective(Goods record);

    int updateByPrimaryKey(Goods record);

    String getId(String goodsName);

}